home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-02
/
savage.zip
/
SAVAGE.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1991-04-03
|
530b
|
30 lines
program savage;
(*$I timerd12.inc *)
const
iloop = 2500;
var
i : longint;
a : real;
function tan (a:real) : real;
begin
tan := sin (a) / cos (a);
end;
begin
write ('start...');
a := 1.0;
timer(start);
for i := 1 to iloop - 1 do
begin
a := tan(arctan(exp(ln(sqrt(a * a))))) + 1;
end;
timer(stop);
writeln ('stop');
writeln ('elapsed time is ',ElapsedTime:10:2,' seconds');
writeln ('A =',a/iloop : 15:14);
end.